using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Net.Mail;
namespace winWeb
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
FtpWebRequest f = (FtpWebRequest)WebRequest.Create("ftp://localhost/alaki/mytest.txt");
//f.Credentials = new NetworkCredential("username", "password");
FtpWebResponse res = (FtpWebResponse)f.GetResponse();
Stream s= res.GetResponseStream();
StreamReader sr = new StreamReader(s);
textBox1.Text= sr.ReadToEnd();
}
private void button2_Click(object sender, EventArgs e)
{
WebClient w = new WebClient();
//w.Credentials = new NetworkCredential("username", "password");
w.DownloadFile("ftp://localhost/alaki/mytest.txt", "c:\\me.tr");
}
private void button3_Click(object sender, EventArgs e)
{
WebClient w = new WebClient();
w.UploadFile("ftp://localhost/alaki/mytest.t", "c:\\MyTest.txt");
}
Uri u = new Uri("http://babolbazar.com/index.aspx?a=12");
//u.Query;
//u.AbsolutePath;
//u.AbsolutePath;
}
private void button6_Click(object sender, EventArgs e)
{
IPAddress ip = IPAddress.Parse("127.0.0.1");
ip = IPAddress.Loopback;
ip = IPAddress.Any;
ip = IPAddress.Broadcast;
علاقه مندی ها (Bookmarks)